Multistate development workflow for generating a custom instruction set reconfigurable processor

ABSTRACT

Systems and methods which implement workflows for providing reconfigurable processor core algorithms operable with associated capabilities using description files, thereby facilitating the development and generation of instruction sets for use with reconfigurable processors, are shown. Embodiments implement a multistage workflow in which program code is parsed into custom instructions and corresponding capability descriptions for generating reconfigurable processor loadable instruction sets. The multistage workflow of embodiments includes a hybrid threading complier operable to compile input program code into custom instructions using a hardware timing agnostic approach. A timing manager of the multistage workflow of embodiments utilizes capabilities information provided in association with the custom instructions generated by the hybrid threading complier to impose hardware timing on the custom instructions. A framework generator and hardware description language complier are also included in the multistage workflow of embodiments.

CROSS-REFERENCE TO RELATED APPLICATIONS

The present application is a continuation of U.S. patent applicationSer. No. 13/658,617 filed Oct. 23, 2012 and entitled “MULTISTAGEDEVELOPMENT WORKFLOW FOR GENERATING A CUSTOM INSTRUCTION SETRECONFIGURABLE PROCESSOR,” which is related commonly assigned U.S.patent application Ser. No. 11/847,169 filed Aug. 29, 2007 and entitled“COMPILER FOR GENERATING AN EXECUTABLE COMPRISING INSTRUCTIONS FOR APLURALITY OF DIFFERENT INSTRUCTION SETS,” which issued Oct. 15, 2013 asU.S. Pat. No. 8,561,037; U.S. patent application Ser. No. 11/969,792filed Jan. 4, 2008 and entitled “MICROPROCESSOR ARCHITECTURE HAVINGALTERNATIVE MEMORY ACCESS PATHS;” and U.S. patent application Ser. No.12/186,372 filed Aug. 5, 2008 and entitled “MULTIPLE DATA CHANNEL MEMORYMODULE ARCHITECTURE,” which issued Jan. 10, 2012 as U.S. Pat. No.8,095,735, the disclosures of which are hereby incorporated herein byreference in their entirety.

TECHNICAL FIELD

The invention relates generally to reconfigurable processor basedcomputing and, more particularly, to workflows for providingreconfigurable processor core algorithms and associated externalcapabilities using description files.

BACKGROUND OF THE INVENTION

The popularity of computing systems continues to grow and the demand forimproved processing architectures thus likewise continues to grow.Ever-increasing desires for improved computing performance/efficiencyhas led to various improved processor architectures. For example,multi-core processors are becoming more prevalent in the computingindustry and are being used in various computing devices, such asservers, personal computers (PCs), laptop computers, personal digitalassistants (PDAs), wireless telephones, and so on.

In the past, processors such as central processing units (CPUs) featureda single execution unit to process instructions of a program. Morerecently, computer systems are being developed with multiple processorsin an attempt to improve the computing performance of the system. Insome instances, multiple independent processors may be implemented in asystem. In other instances, a multi-core architecture may be employed,in which multiple processor cores are amassed on a single integratedsilicon die. Each of the multiple processors (e.g., processor cores) cansimultaneously execute program instructions. This parallel operation ofthe multiple processors can improve performance of a variety ofapplications.

Various devices are known that are reconfigurable. Examples of suchreconfigurable devices include field-programmable gate arrays (FPGAs). Afield-programmable gate array (FPGA) is a well-known type ofsemiconductor device containing programmable logic components called“logic blocks”, and programmable interconnects. Logic blocks can beprogrammed to perform the function of basic logic gates such as AND, andXOR, or more complex combinational functions such as decoders or simplemathematical functions. In most FPGAs, the logic blocks also includememory elements, which may be simple flip-flops or more complete blocksof memories. A hierarchy of programmable interconnects allows logicblocks to be interconnected as desired by a system designer. Logicblocks and interconnects can be programmed by the customer/designer,after the FPGA is manufactured, to implement any logical function, hencethe name “field-programmable.”

Configurations of the foregoing FPGAs may be utilized to providereconfigurable processors, wherein binary files for implementing gatenetlists designed to configure the FPGA for particular reconfigurableprocessor operation are loaded onto the FPGA, in the form of a loadableinstruction set, in order to provide it with a desired operational“personality” (e.g., an instruction set optimized for providingparticular operations, such as floating point calculations, graphicsrendering, cryptographic functions, etc.). For example, one or more FPGAmay be provided in association with a CPU (e.g., a fixed instruction sethost processor, such as a processor implementing a x86 instruction set)to provide a heterogeneous co-processor configuration, whereby the FPGAmay be dynamically configured to provide co-processor functionalityoptimized with respect to a current operation or use of the hostprocessor. Such dynamically reconfigurable heterogeneous co-processorimplementations provide advantages in functionality and performance.

However, creating the instruction sets to implement FPGA personalitiesfor providing desired operations has historically been challenging. Inparticular, the hardware level implementation of the reconfigurableaspect of such FPGAs has generally required uniquely talentedindividuals, having skill sets and detailed knowledge of hardwareconfiguration and software coding. Accordingly, the development ofinstruction sets for use with respect to reconfigurable processors hasbeen somewhat limited and has generally required appreciable developmenttime.

BRIEF SUMMARY OF THE INVENTION

The present invention is directed to systems and methods which implementworkflows for providing reconfigurable processor core algorithmsoperable with associated external capabilities using description files,thereby facilitating the development and generation of instruction setsfor use with reconfigurable processors. Embodiments of the inventionimplement a multistage workflow in which program code is parsed intocustom instructions and corresponding capability descriptions forgenerating reconfigurable processor loadable instruction sets. Themultistage workflow and associated description files (e.g., including acustom instructions description file and a framework capabilitiesdescription file) facilitates the use of standard programming languages(e.g., C++), using suitable pragmas, and personnel without specializedhardware level skills to develop (including design, debug, analyze,and/or generate) instruction sets for reconfigurable processors whichare optimized for any of a number of processor functions. Moreover, themultistage workflow of embodiments is adapted to facilitate relativelyrapid performance analysis and iterative optimization, such as throughsimulation using an instruction set framework generated by themultistage workflow. Embodiments of the multistage workflow implementone or more flags to facilitate the controlled use or inclusion ofcertain features with respect to particular stages of the development ofinstruction sets (e.g., a debug flag and/or an instrumentation flag toimplement control of debugging and/or instrumentation at a hardwaredescription language compiler stage).

In operation according to embodiments of the invention, a compilercompiles applications with embedded pragmas into host processor code(e.g., x86 processor code) and coprocessor hardware translation (e.g.,custom instructions to be implemented on a field programmable gate arrayor other reconfigurable processor operable as a coprocessor). Forexample, the hardware translation provided by the complier converts thecode identified by pragmas to a set of hardware states that are executedby hardware state machines. Timing management is applied, according toembodiments of the invention, to code segments targeted for thecoprocessor to break the code segments into code that can be performedas a single state machine state. A common framework for the compressoris defined, according to embodiments, that includes the host interface,hardware state machines, and interface to memory. The common frameworkis generated for the current reconfigurable processor personality (e.g.,instruction set optimized for providing particular operations) toaccommodate multiple modules (e.g., functional blocks of custominstructions operable upon the reconfigurable processor), threading(e.g., hardware threading wherein a hardware state machine is timeshared across many threads, such as to accommodate latency to memory,wherein if the code for a thread takes too many clocks to execute thethread may be broken into multiple code segments such that each codesegment would be handled on a separate hardware state machine),call/return (e.g., using threads between modules), thread local, threadprivate, thread shared, global variables, staging variables, privatevariables, etc.

A multistage development workflow of embodiments of the inventioncomprises a description file complier stage accepting input of programcode in a standard programming language, providing parsing of theprogram code into custom instructions for execution by a reconfigurableprocessor, and providing output of a custom instructions descriptionfile and a framework capabilities description file adapted for furtherprocessing by subsequent stages of the workflow. The hybrid threadingcomplier of embodiments is adapted to generate the custom instructionsin a timing agnostic process, such as through the use of a constraintset, whereby the hybrid threading complier is not burdened withaddressing hardware timing issues of the reconfigurable processor. Thecustom instructions provided by the hybrid threading compiler preferablycomprise a set of instructions, derived from the input program code,that are operable together to implement the reconfigurable processorcore algorithm defined by the input program code. The capabilitydescriptions provided by the hybrid threading compiler preferablycomprise information regarding the capabilities (e.g., variables,modules, and/or other resources) utilized by corresponding custominstructions.

The multistage development workflow of embodiments further comprises atiming management stage accepting input of the foregoing custominstructions description file and framework capabilities descriptionfile, analyzes the custom instructions with respect to hardware timing(e.g., using a timing constraint database), and provides output of thecustom instructions description file and the framework capabilitiesdescription file adapted for implementing appropriate timing in thereconfigurable processor. For example, the timing manager may breakcustom instructions into a plurality of clock cycle blocks, insertstaging registers in appropriate positions in the custom instructions,etc. in order to make hardware timing requirements of the reconfigurableprocessor. Correspondingly, the timing manager may insert informationregarding the added staging registers in the framework capabilitiesdescription file.

The multistage development workflow of embodiments further comprises aframework generator stage accepting input of the foregoing timingadapted description files, generating the connection information tofacilitate proper execution of the custom instructions and theirinteraction with reconfigurable processor capabilities, and providing aframework comprising one or more routines that call the custominstructions and implements the appropriate reconfigurable processorcapabilities. The framework preferably comprises an executabledescription of the reconfigurable processor core algorithm, adapted toaccommodate hardware timing, and interfaces to appropriatereconfigurable processor capabilities.

In operation according to embodiments of the invention, the foregoingframework may be utilized in simulating operation of the reconfigurableprocessor (e.g., to analyze performance of the core algorithmimplementation, to optimize the custom instructions, etc.) and/or togenerate an executable for loading in a reconfigurable processor forimplementing the instruction set. Accordingly, the framework generatedaccording to embodiments of the invention may be provided to a simulatorand/or a hardware description language complier.

A hardware description language complier of the multistage developmentworkflow of embodiments accepts input of the framework and compiles theprogram code therein into a hardware description language suitable forgenerating bitstream files used in configuring reconfigurable processorswith an instruction set. The hardware description language compiler ofembodiments is responsive to one or more flags to control certainfeatures (e.g., debug flags and/or instrumentation flags such as may beutilized in the development of instruction sets).

The foregoing has outlined rather broadly the features and technicaladvantages of the present invention in order that the detaileddescription of the invention that follows may be better understood.Additional features and advantages of the invention will be describedhereinafter which form the subject of the claims of the invention. Itshould be appreciated by those skilled in the art that the conceptionand specific embodiment disclosed may be readily utilized as a basis formodifying or designing other structures for carrying out the samepurposes of the present invention. It should also be realized by thoseskilled in the art that such equivalent constructions do not depart fromthe spirit and scope of the invention as set forth in the appendedclaims. The novel features which are believed to be characteristic ofthe invention, both as to its organization and method of operation,together with further objects and advantages will be better understoodfrom the following description when considered in connection with theaccompanying figures. It is to be expressly understood, however, thateach of the figures is provided for the purpose of illustration anddescription only and is not intended as a definition of the limits ofthe present invention.

BRIEF DESCRIPTION OF THE DRAWING

For a more complete understanding of the present invention, reference isnow made to the following descriptions taken in conjunction with theaccompanying drawing, in which:

FIG. 1 shows a multistage development workflow according to embodimentsof the invention;

FIG. 2 shows a computer system as may be adapted to provide thefunctional blocks of a multistage development workflow of embodiments ofthe invention; and

FIG. 3 shows pseudo code generated by operation of functional blocks ofa multistage development workflow of embodiments of the invention.

DETAILED DESCRIPTION OF THE INVENTION

FIG. 1 shows multistage development workflow 100 of embodiments of theinvention. Multistage development workflow 100 of the illustratedembodiment includes 4 stages, including a description file compilerstage provided by hybrid threading compiler 110, a timing adaptationstage provided by timing manager 120, a framework generation stageprovided by framework generator 130, and a hardware description languagecompiler stage provided by hardware description language compiler 140,cooperative to provide reconfigurable processor instruction setdevelopment using description files herein. Moreover, multistagedevelopment workflow 100 of the embodiment shown in FIG. 1 is adapted tofacilitate relatively rapid performance analysis and iterativeoptimization of custom instruction sets through simulation usingsimulator 150.

It should be appreciated that the foregoing functional blocks of theillustrated multistage development workflow (i.e., hybrid threadingcompiler 110, timing manager 120, framework generator 130, hardwaredescription language compiler 140, and simulator 150) may be implementedas one or more processor-based systems operable under control of acorresponding instruction set defining operation as described herein.For example, one or more of the functional blocks of FIG. 1 may beimplemented in software as code segments to perform the described tasks.The program or code segments can be stored in a computer readablemedium. Examples of such a computer readable medium include anelectronic circuit, a semiconductor memory device, a read only memory(ROM), a flash memory, a magnetic disk, an optical disk, etc. The codesegments may additionally or alternatively be downloaded via computernetworks, such as the Internet, an intranet, etc.

FIG. 2 illustrates computer system 200 as may be adapted with theaforementioned code segments to provide the functional blocks of amultistage development workflow of embodiments herein. Computer system200 of the illustrated embodiment includes central processing unit (CPU)201 coupled to system bus 202. CPU 201 may be any general purpose CPU,such as a processor from the CORE line of processors from IntelCorporation. However, the present invention is not restricted by thearchitecture of CPU 201 and thus embodiments may utilize anyconfiguration of CPU 201 supporting operation according to the conceptsdescribed herein. Bus 202 is coupled to random access memory (RAM) 203,which may be static random access memory (SRAM), dynamic random accessmemory (DRAM), synchronous dynamic random access memory (SDRAM),non-volatile random access memory (NVRAM), and/or any other suitableconfiguration of computer readable memory. Read only memory (ROM) 204 isalso coupled to bus 202, which may comprise programmable read onlymemory (PROM), erasable programmable read only memory (EPROM),electrically erasable programmable read only memory (EEPROM), and/or anyother suitable configuration of computer readable memory. RAM 203 andROM 204 hold user and system data and programs as is well known in theart.

Bus 202 of the illustrated embodiment of computer system 200 is alsocoupled to input/output (I/O) controller 205, communications adapter211, user interface 208, and display adaptor 209. I/O adapter 205 of theillustrated embodiment connects storage devices 206, such as maycomprise one or more forms of bulk storage (e.g., magnetic media,optical media, solid state memory, etc.), to the computer system. I/Oadapter 205 of the illustrated embodiment is also connected to printer214, which would allow the system to output copies of information suchas documents, reports, code listings, etc. Communications adaptor 211 isadapted to couple computer system 200 of the illustrated embodiment tonetwork 212, which may be one or more of the public switched telephonenetwork (PSTN), a local area network (LAN), a metropolitan area network(MAN), a wide-area network (WAN), the Internet, an intranet, anextranet, etc. User interface 208 couples user input devices, such askeyboard 213, pointing device 207, and microphone 216, to computersystem 200. User interface 208 also provides output to a user, such asoutput of sound via speaker(s) 215. Display adaptor 209 is driven by CPU201 to control the display on display device 210.

Referring again to FIG. 1, in operation of multistage developmentworkflow 100 of embodiments, program code 102 for implementing a corealgorithm as a reconfigurable processor instruction set is provided tohybrid threading complier 110 of a description file compiler stage ofthe workflow. Program code 102 provided to hybrid threading complier 110of embodiments comprises a standard programming language (e.g., C++) toaccommodate the use of personnel without specialized hardware levelskills to develop instruction sets for reconfigurable processors usingthe workflow herein. For example, program code 102 may utilize standardconstructs, such as “for”, “if”, “while”, case statements, switchstatements, etc. as represented by the pseudo code shown in FIG. 3, tofacilitate programming of reconfigurable processor core algorithms usingsoftware programming skill sets.

Program code 102 may include various pragmas in addition to theaforementioned standard programming language constructs, such as toprovide information for downstream optimizations etc. For example, acompiler of multistage development workflow 100 may be adapted togenerate an executable comprising instructions for a plurality ofdifferent processor instruction sets (e.g., a heterogeneousmulti-processor configuration), such as shown and described in the abovereferenced patent application entitled “Compiler for Generating anExecutable Comprising Instructions for a Plurality of DifferentInstruction Sets.” Accordingly, pragma statements may be included in theprogram code to indicate sections of the program code to be run on aco-processor of a multi-processor configuration.

Hybrid threading compiler 110 of embodiments operates to parsestatements contained in program code 102 into custom instructions andcorresponding capability descriptions for use in generatingreconfigurable processor loadable instruction sets herein. Accordingly,hybrid threading complier 110 of the embodiment illustrated in FIG. 1accepts input of program code 102, provides parsing of the program codestatements into custom instructions for execution by a reconfigurableprocessor, and provides output of custom instructions description file112 and framework capabilities description file 113. For example, hybridthreading complier 110 of embodiments analyzes the statements of programcode 102 that are to be executed by the reconfigurable processor andaggregates those statements into custom instructions, wherein suchcustom instructions may comprise the individual case entries withinswitch statements, as represented in the pseudo code of FIG. 3, forimplementing the instructions in the hardware of a reconfigurableprocessor. The custom instructions are output by hybrid threadingcomplier of the illustrated embodiment in custom instruction descriptionfile 112. Hybrid threading complier 110 is preferably adapted toidentify (e.g., through analysis of the input program code) thereconfigurable processor capabilities (e.g., variables accessed, modulescalled, etc.) that the custom instructions utilize. Informationregarding the reconfigurable processor capabilities utilized by thecustom instructions is output by hybrid threading complier 110 of theillustrated embodiment in framework capabilities description file 113.It should be appreciated that the information included in frameworkcapabilities description file 113 of embodiments may include suchinformation as variable type, external module identification, portidentification, support for modules with multi-threaded execution withcustom instructions, support for C style typedefs, structures, andunions, support for thread private, thread shared, global variables, andpipeline staging variables, support for custom instruction memory readand write operations, support for modules to interact including remotemodule thread creation, message passing, and global variable access,etc.

Hybrid threading complier 110 of embodiments is adapted to generate thecustom instructions in a timing agnostic process, whereby hybridthreading compiler 110 compiles code independent of the reconfigurableprocessor hardware latency requirements. Hybrid threading complier 110of embodiments parses input program code statements into a switchstatement and case entries, assuming the switch statement and caseentries are accomplished in a single reconfigurable processor clockcycle, and is thus not burdened with addressing hardware timing issuesof the reconfigurable processor. The timing agnosticity of hybridthreading complier 110 according to embodiments alleviates the burden ofthe compiler associated with identifying and resolving hardware timingimplementation, thereby facilitating higher performance compileroperation and/or the use of less computing resources by the compiler.Moreover, such timing agnosticity facilitates a backend configuration ofthe multistage development workflow in which the compiled results may beapplied to different uses (e.g., different reconfigurable processorconfigurations, different clock speeds, etc.) that would requiredifferent timing constraints. Appropriate sets of timing constraints(discussed below), implemented in adapting the description files forhardware timing, may be utilized in generating the reconfigurableprocessor instruction sets for such different uses from a same instanceof the custom instruction description file.

In order to facilitate the timing agnostic operation of hybrid threadingcomplier 110 of embodiments, constraint set 111 (e.g., as may be storedin a database of, or accessible to, hybrid threading complier 110) isprovided setting forth one or more constraint with respect to the custominstructions. The constraints of constraint set 111 comprise constraintsto be imposed upon hybrid threading compiler 110 to facilitate itsoperation based upon an assumption that the performance of a custominstruction not exceeding any such constraint, irrespective of thenumber of input program code statements aggregated into the custominstruction, may be completed in a single clock cycle of thereconfigurable processor. Constraint set 111 of embodiments mayestablish custom instruction constraints based upon physical limitationsimposed by framework generator 130 to thereby prevent a terminalconflict resulting from the foregoing single clock cycle assumption. Forexample, memory access constraints (e.g., one memory access per custominstruction), arrayed variable access constraints (e.g., arrayedvariables can have a single access per custom instruction), messaginginterface constraints (e.g., a single message can be received and sentusing any given messaging interface), etc. may be imposed. As a custominstruction is being generated, hybrid threading complier 110 ofembodiments analyzes the capabilities implicated by the custominstruction and, when it is determined that any constraint of constraintset 111 is met or would be exceeded, it may be determined that thecustom instruction cannot include further input program code statementsand thus generation of another custom instruction of the reconfigurableprocessor instruction set is begun.

As an example of the use of the foregoing constraints, assume that theflexibility afforded by framework generator 140 in providingreconfigurable processor capabilities for the custom instructionsprovides a single port to memory, and thus a constraint of constraintset 111 restricts a custom instruction to a single external memoryaccess in any single clock cycle. As input program code statements areparsed by hybrid threading complier 110 to generate a custominstruction, reconfigurable processor capability utilization ispreferably analyzed to identify external memory access (and informationregarding the capabilities utilized by the custom instructions ispreferably included in framework capabilities description file 113 forsubsequent use). When it is determined that a second external memoryaccess would be implicated by the input program code statements beingparsed into a single custom instruction, generation of the currentcustom instruction is completed and a subsequent custom instruction isgenerated to implement the input program code statement including thesecond external memory access.

As another example of the use of the foregoing constraints, assume thatthe flexibility afforded by framework generator 140 in providingreconfigurable processor capabilities for the custom instructionsprovides for access to all shared variables, all private variables, andall global variables, the reconfigurable processor accommodates accessof only one element of a variable array (whether shared, private, orglobal) in any single clock cycle. As input program code statements areparsed by hybrid threading complier 110 to generate a custominstruction, reconfigurable processor capability utilization ispreferably analyzed to identify variable array access. When it isdetermined that access to a second element of a variable array would beimplicated by the input program code statements being parsed into asingle custom instruction, generation of the current custom instructionis completed and a subsequent custom instruction is generated toimplement the input program code instruction including the secondvariable array element access.

It can be appreciated from the foregoing that the custom instructionsprovided by hybrid threading compiler 110 of embodiments comprises a setof custom instructions, derived from the input program code, that areoperable together to implement the reconfigurable processor corealgorithm defined by the input program code. The capability descriptionsoutput by hybrid threading compiler 110 of embodiments compriseinformation regarding the capabilities (e.g., variables, modules, and/orother resources) utilized by the corresponding custom instructions.

In operation according to the illustrated embodiment, the descriptionfiles output by hybrid threading complier 110 (e.g., custom instructionsdescription file 112 and framework capabilities description file 113)are provided to timing manager 120 for processing to adapt the custominstructions for reconfigurable processor hardware timing. Accordingly,timing manager 120 of embodiments accepts input of custom instructionsdescription file 112 and framework capabilities description file 113,analyzes the custom instructions with respect to hardware timing, andprovides output of custom instructions description file 122 andframework capabilities description file 123 adapted for implementingappropriate timing in the reconfigurable processor. For example, timingmanager 120 may analyze each of the individual case statements of thecustom instructions to determine how many physical clock cycles tospread those instructions over in order to make the target timingrequirements. Timing manager 120 of embodiments references frameworkcapabilities description file 113 when analyzing the custom instructionsof custom instructions description file 112, such as informationregarding the type of variable, the capabilities implicated, etc., todetermine hardware timing for the custom instructions.

In order to facilitate the custom instruction timing adaptationoperation of timing manager 120 of embodiments, timing constraints 121(e.g., as may be stored in a database of, or accessible to, timingmanager 120) is provided setting forth one or more constraint withrespect to the hardware timing of the reconfigurable processor. Timingconstraints 121 of embodiments may establish timing constraints basedupon physical timing of reconfigurable processor capabilities. Forexample, timing constraints 121 may provide information regarding thelatency for implementing each of a plurality of capabilities, such asthe latency for performing all operations (e.g., add, subtract, logical,etc.), the latency for performing variable access, etc. Using the timingconstraint analysis, timing manager 120 of embodiments operates to adaptthe custom instructions for reconfigurable processor hardware timing.For example, timing manager 120 may operate to spread an instructionover multiple clock cycles in order to make the target timingrequirements, as represented by instruction 311 being broken intopipeline stages 321 and 322 in the pseudo code of FIG. 3, therebyproviding timing adapted custom instructions description file 122.Additionally or alternatively, timing manager 120 may insert stagingregisters in appropriate positions in the custom instructions inproviding timing adapted custom instructions description file 122, suchas to accommodate the foregoing spreading of instructions over aplurality of clock cycles. Correspondingly, timing manager 120 mayinsert information regarding the added staging registers in theframework capabilities description file to thereby provide timingadapted framework capabilities description file 123.

In operation according to the illustrated embodiment, the timing adapteddescription files output by timing manager 120 (e.g., timing adaptedcustom instructions description file 122 and timing adapted frameworkcapabilities description file 123) are provided to framework generator130 for processing to generate one or more modules comprising routinesthat call the custom instructions and implement the appropriatereconfigurable processor capabilities. Accordingly, framework generator130 of embodiments accepts input of custom instructions description file122 and framework capabilities description file 123, generates theconnection information to facilitate proper execution of the custominstructions and their interaction with reconfigurable processorcapabilities, and provides a framework comprising one or more routinesthat call the custom instructions and implements the appropriatereconfigurable processor capabilities. It should be appreciated that aplurality of modules may be implemented using multistage developmentworkflow 100 of embodiments. Thus, multiple instances of custominstruction description file 122 and framework capabilities descriptionfile 123, as provided by hybrid threading compiler 110 and timingmanager 120 with respect to the input program code statements of thevarious modules, may be provided to framework generator 130 for use ingenerating the framework. Operation of framework generator 130 accordingto embodiments herein adds the code for setting up the interfaces (e.g.,memory interfaces, module interfaces, etc.) used by the custominstructions of custom instructions 122.

The generated framework is output by framework generator 130 of theillustrated embodiment as framework file 132. Framework file 132preferably comprises an executable description of the reconfigurableprocessor core algorithm, adapted to accommodate hardware timing, andinterfaces to appropriate reconfigurable processor capabilities asrepresented by the pseudo code of FIG. 3.

Generating the framework by framework generator 130 of embodimentscomprises analyzing the capabilities implicated by the custominstructions and generating one or more routine that provides all thosecapabilities (e.g., all the variables, interfaces to memory, interfacesto other modules, etc.) in the form of an executable module. Frameworksgenerated by framework generator 130 according to embodiments of theinvention implement threads as a means to perform the desiredcomputational operations, wherein the threads execute the aforementionedcustom instructions. In accordance with frameworks of embodimentsherein, a single custom instruction is executed for an individual threadat any one point in time, whereas a module executes a custom instructionrequiring multiple clock cycles to execute. As previously mentioned,hardware timing constraints are met by spreading a custom instructionacross multiple clock cycles according to embodiments herein. A thread,from a set of threads belonging to a module, is able begin executionevery clock cycle within each module. Frameworks of embodiments providea reconfigurable processor personality comprising multiple modules,wherein the multiple modules interact through well-defined moduleinterfaces (e.g., module interfaces comprising thread call/return,message passing, global variable references, etc.). The aforementionedframework capabilities description files preferably specify the moduleinterfaces as well as the resources required within each module (e.g.,thread load and thread private variables).

Framework generator 130 of embodiments provides a framework comprising acomplete, executable SystemC model of the reconfigurable processor, suchas may be run using the C++ compiler of the SystemC model. The modelgenerated by the framework generator of embodiments is clock cycleaccurate with respect to the reconfigurable processor implementation.Accordingly, framework file 132 may be provided to hardware descriptionlanguage compiler 140 to generate the actual hardware descriptionlanguage (e.g., VERILOG HDL) of that module. However, simulation of thereconfigurable processor implementing the custom instruction set, asprovided in the generated framework, may be used to optimize the custominstruction set or to otherwise improve the performance thereof.

Accordingly, the illustrated embodiment of multistage developmentworkflow 100 optionally provides framework file 132 to simulator 150 forsimulating operation of the reconfigurable processor (e.g., to analyzeperformance of the core algorithm implementation, to optimize the custominstructions, etc.). Simulator 150 of embodiments may, for example,provide execution of a SystemC model provided by framework file 132 tosimulate the operation of a reconfigurable processor with the custominstructions. The input program code, and thus the generated frameworkexecutable, may be instrumented to collect performance information(e.g., through inclusion of instrumentation statements), to therebyprovide performance results 152. The information provided by performanceresults 152 provides insight into various aspects of the operation ofthe reconfigurable processor, such as to indicate which instructionshave been executed, which instructions had to be retried because theresources they required were busy at that point in time, queuestatus/depths for each module, memory bandwidth being used by eachmodule, etc.

Using this instrumented information, embodiments of the invention mayiterate back through the custom instruction generation process (e.g.,returning to an appropriate one of hybrid threading module 110, timingmanager 120, and/or framework generator 130) to modify variousparameters. For example, where particular resources were not availablefor execution of an instruction, embodiments may operate to modify howmany instances of a module are actually used. Framework generator 140may use information specifying that a particular module does not haveenough capability by itself to generate two instances of that module,whereby even threads may be sent to one instance of the module and oddthreads may be sent to the other instance of the module, for example,such that twice the resources capability to perform those particularcustom instructions is provided. Such performance results analysis basedmodification of the custom instruction set allows the ability to balancethe use of resources across all of the modules, which may providesignificant gains in performance.

In operation according to the illustrated embodiment, framework file 132output by framework generator 130 (e.g., after having been optimized orotherwise performance enhanced through simulation and performanceanalysis) is provided to hardware description language compiler 140 forprocessing to generate one or more hardware description language file142 a-142 c corresponding to the modules of a custom instruction set.Accordingly, hardware description language complier 140 of multistagedevelopment workflow 100 of embodiments accepts input of framework file132 and compiles the program code therein into a hardware descriptionlanguage (e.g., VERILOG HDL) suitable for generating bitstream filesused in configuring reconfigurable processors with an instruction set.

Embodiments of multistage development workflow 100 implement one or moreflags to facilitate the controlled use of certain features with respectto particular stages of the development of instruction sets. Forexample, the aforementioned instrumentation statements may be includedin the input program code, and thus the custom instructions generated byhybrid threading complier 110 and timing manager 120 and the frameworkgenerated by framework generator 130, for use in performance analysis bysimulator 150. Similarly, various debug statements may be included inthe input program code, and thus the custom instructions generated byhybrid threading complier 110 and timing manager 120 and the frameworkgenerated by framework generator 130, for use in debugging operation ofthe custom instruction set as operable upon simulator 150 or the actualreconfigurable processor. However, such instrumentation and/or debugstatements may be unnecessary or undesired in the final instruction setto be loaded on a reconfigurable processor. Accordingly, hardwaredescription language complier 140 of embodiments herein is responsive toone or more flags to control certain features utilized in thedevelopment of instruction sets (e.g., a debug flag to implement controlinclusion debug instructions in the generated hardware descriptionlanguage files, an instrumentation flag to control inclusion ofinstrumentation instructions in the generated hardware descriptionlanguage files, etc.). For example, by including the appropriate flag ina pragma of the input program code, the hardware description languageinstruction set generated by hardware description language compiler 140may be controlled to include or exclude instructions identified as debugand/or instrumentation instructions. Thus, an instruction set generatedby multistage development workflow 100 and loaded on a reconfigurableprocessor may include or be stripped of such debugging and/orinstrumentation instructions, as desired (e.g., depending upon a stateof the development of the instruction set, etc.).

As one example of the foregoing use of flags, hardware asserts may beincluded in the input program code, and thus the custom instructionsgenerated by hybrid threading complier 110 and timing manager 120 andthe framework generated by framework generator 130 (as represented inthe pseudo code of FIG. 3), for use in debugging the custominstructions. For example, such hardware asserts may be used in theaforementioned simulation to monitor the progress of execution ofinstructions, to view the state of registers, etc. Such hardware assertsmay be useful in a non-final iteration of the generated hardwaredescription language for similar debugging of the actual hardwareimplementation. However, such hardware asserts may not be desirable inthe final custom instruction set, due to their associated FPGA resourcesand imposed timing constraints. Using the aforementioned flags, suchhardware asserts may be automatically eliminated from the custominstruction set as generated by hardware description language compiler140 to thereby provide a finalized custom instruction set without theneed for manually removing the hardware asserts from the input programcode.

Although the present invention and its advantages have been described indetail, it should be understood that various changes, substitutions andalterations can be made herein without departing from the spirit andscope of the invention as defined by the appended claims. Moreover, thescope of the present application is not intended to be limited to theparticular embodiments of the process, machine, manufacture, compositionof matter, means, methods and steps described in the specification. Asone of ordinary skill in the art will readily appreciate from thedisclosure of the present invention, processes, machines, manufacture,compositions of matter, means, methods, or steps, presently existing orlater to be developed that perform substantially the same function orachieve substantially the same result as the corresponding embodimentsdescribed herein may be utilized according to the present invention.Accordingly, the appended claims are intended to include within theirscope such processes, machines, manufacture, compositions of matter,means, methods, or steps.

1. A method comprising: parsing, by a compiler, statements of inputprogram code to generate custom instructions for an instruction setloadable upon a reconfigurable processor; analyzing, by the compiler,the statements to determine capabilities of the reconfigurable processorthat are used by the custom instructions; generating a custominstruction description file including the custom instructions; andgenerating a framework capabilities description file includinginformation regarding the capabilities of the reconfigurable processorthat are used by the custom instructions.
 2. The method of claim 1,wherein the input program code comprises program code defining thereconfigurable processor instruction set in a standard programminglanguage.
 3. The method of claim 1, wherein the parsing statements ofinput program code to generate custom instructions comprises:aggregating a plurality of the statements into a single custominstruction.
 4. The method of claim 1, wherein the parsing statements ofinput program code to generate custom instructions is agnostic withrespect to hardware timing of the reconfigurable processor.
 5. Themethod of claim 4, wherein the compiler is configured to generate thecustom instructions based upon an assumption that each custominstruction is performed in a single clock cycle of the reconfigurableprocessor.
 6. The method of claim 4, wherein the parsing statements ofinput program code to generate custom instructions comprises:implementing constraints, from a compiler custom instruction constraintset, based upon physical limitations imposed with respect to thereconfigurable processor, whereby the implementation of the constraintsenables the reconfigurable processor hardware timing agnostic operationby the compiler.
 7. The method of claim 6, wherein the implementingconstraints comprises: preventing a custom instruction from exceedingany constraint of the complier custom instruction constraint set.
 8. Themethod of claim 6, wherein the custom instruction constraint setincludes at least one constraint selected from the group consisting of aconstraint regarding how many ports are available to access memory, aconstraint regarding how many variables may be accessed, a constraintregarding which type of variables may be accessed, a constraintregarding memory access, a constraint regarding arrayed variable access,and a constraint regarding a messaging interface.
 9. The method of claim1, further comprising: adapting, by a timing manager, the custominstructions for hardware timing of the reconfigurable processor,thereby generating timing adapted custom instructions; adapting, by thetiming manager, the information of the framework capabilitiesdescription file to include information regarding the adapting of thecustom instructions, thereby generating timing adapted capabilitiesinformation; generating a timing adapted custom instruction descriptionfile including the timing adapted custom instructions; and generating atiming adapted framework capabilities description file including thetiming adapted capabilities information.
 10. The method of claim 9,wherein the adapting the custom instructions for the reconfigurableprocessor hardware timing comprises: analyzing individual casestatements of the custom instructions to determine how many physicalclock cycles to spread those instructions over in order to make targethardware timing requirements with respect to the reconfigurableprocessor.
 11. The method of claim 9, wherein the adapting the custominstructions for the reconfigurable processor hardware timing comprises:inserting staging registers in appropriate positions in the custominstructions in order to make hardware timing requirements with respectto the reconfigurable processor.
 12. The method of claim 11, wherein theadapting the capabilities information of the framework capabilitiesdescription file comprises adapting the capabilities information toinclude information regarding the staging registers.
 13. The method ofclaim 9, wherein the adapting the custom instructions for hardwaretiming of the reconfigurable processor comprises: analyzing the custominstructions of the custom instructions description file to determinehardware timing for the custom instructions based at least in part onthe capabilities information of the framework capabilities descriptionfile.
 14. The method of claim 13, wherein the adapting the custominstructions for hardware timing of the reconfigurable processorcomprises: implementing timing constraints, from a timing manager timingconstraint set, based upon hardware timing of the reconfigurableprocessor.
 15. The method of claim 14, wherein the timing constraintsare based upon physical timing of reconfigurable processor capabilities.16. The method of claim 15, wherein timing constraint set comprises atleast one timing constraint selected from the group consisting oflatency for implementing memory access, latency for implementing dataoutput, latency for performing operations, and latency for performingvariable access.
 17. The method of claim 9, further comprising:processing, by a framework generator, the custom instructions of thetiming adapted custom instruction description file to generate one ormore modules comprising routines that call the custom instructions andimplement reconfigurable processor capabilities of the timing adaptedframework capabilities description file; and generating a frameworkfile, from the one or more routines, comprising an executabledescription of the reconfigurable processor custom instruction set andinterfaces to appropriate reconfigurable processor capabilities.
 18. Themethod of claim 17, wherein the executable description comprises anexecutable model of the reconfigurable processor.
 19. The method ofclaim 17, further comprising: simulating, using the executablereconfigurable processor custom instruction set description of theframework file, operation of the reconfigurable processor; andoptimizing one or more custom instruction of the custom instruction setusing performance results provided by the simulated operation.
 20. Themethod of claim 17, further comprising: generating, using the frameworkfile, one or more hardware description language file for loading thecustom instruction set on the reconfigurable processor.
 21. The methodof claim 20, wherein the generating one or more hardware descriptionlanguage file comprises: analyzing the framework file for the presenceof one or more flags to provide controlled use or inclusion of certainfeatures within the custom instructions of hardware description languagefile.
 22. The method of claim 21, wherein the one or more flags includesat least one flag selected from the group consisting of a debug flag andan instrumentation flag.
 25. An apparatus comprising: one or morecomputer processors implementing a compiler adapted to parse statementsof input program code and generate a custom instruction description fileincluding custom instructions for an instruction set loadable upon areconfigurable processor, the compiler further adapted to analyze thestatements of the input program code and generate a frameworkcapabilities description file including information regardingcapabilities of the reconfigurable processor that are used by the custominstructions; and at least one memory coupled to the one or morecomputer processors.
 26. The apparatus of claim 25, wherein the compilerparses statements of the input program code to aggregate a plurality ofthe statements into a single custom instruction.
 27. The apparatus ofclaim 25, wherein the one or more computer processors further implement:a compiler custom instruction constraint set including one or moreconstraint based upon physical limitations imposed with respect to thereconfigurable processor, wherein the complier is adapted to implementconstraints of the constraint set when generating custom instructions ofthe custom instruction description file.
 28. The apparatus of claim 27,wherein the constraint set includes at least one constraint selectedfrom the group consisting of a constraint regarding how many ports areavailable to access memory, a constraint regarding how many variablesmay be accessed, a constraint regarding which type of variables may beaccessed, a constraint regarding memory access, a constraint regardingarrayed variable access, and a constraint regarding a messaginginterface.
 29. The apparatus of claim 27, wherein the compiler isconfigured to generate the custom instructions based upon an assumptionthat each custom instruction is performed in a single clock cycle of thereconfigurable processor.
 30. The apparatus of claim 27, wherein thecomplier prevents a custom instruction from exceeding any constraint ofthe complier custom instruction constraint set.
 31. The apparatus ofclaim 27, wherein the compiler adapted to implement constraints of theconstraint set is agnostic with respect to hardware timing of thereconfigurable processor.
 32. The apparatus of claim 25, wherein the oneor more computer processors further implement: a timing manager adaptedto adapt the custom instructions of the custom instruction descriptionfile for hardware timing of the reconfigurable processor and generate atiming adapted custom instruction description file including the timingadapted custom instructions, the timing manager further adapted to adaptthe capabilities information of the framework capabilities descriptionfile to include information regarding the adapted custom instructions.33. The apparatus of claim 32, wherein the timing adapted custominstruction description file includes staging registers inserted inappropriate positions in the custom instructions in order to makehardware timing requirements with respect to the reconfigurableprocessor.
 34. The apparatus of claim 33, wherein the timing adaptedframework capabilities description file includes information regardingthe staging registers.
 35. The apparatus of claim 32, wherein the one ormore computer processors further implement: a timing constraint setincluding information regarding hardware timing of the reconfigurableprocessor.
 36. The apparatus of claim 35, wherein the timing constraintsare based upon physical timing of reconfigurable processor capabilities.37. The apparatus of claim 36, wherein timing constraint set comprisesat least one timing constraint selected from the group consisting oflatency for implementing memory access, latency for implementing dataoutput, latency for performing operations, and latency for performingvariable access.
 38. The apparatus of claim 32, wherein the one or morecomputer processors further implement: a framework generator adapted togenerate a framework file comprising an executable description of thereconfigurable processor custom instruction set using the custominstructions of the timing adapted custom instruction description fileand the reconfigurable processor capabilities information of the timingadapted framework capabilities description file.
 39. The apparatus ofclaim 38, wherein the one or more computer processors further implement:a simulator adapted to simulate operation of the reconfigurableprocessor using the executable reconfigurable processor custominstruction set description of the framework file.
 40. The apparatus ofclaim 38, wherein the one or more computer processors further implement:a hardware description language complier adapted to generate, using theframework file, one or more hardware description language file forloading the custom instruction set on the reconfigurable processor. 41.A method comprising: parsing, by a compiler, statements of input programcode to generate custom instructions for an instruction set loadableupon a reconfigurable processor; analyzing, by the compiler, thestatements to generate capabilities information regarding capabilitiesof the reconfigurable processor that are used by the custominstructions; adapting, by a timing manager, the custom instructions forhardware timing of the reconfigurable processor; and adapting, by thetiming manager, the capabilities information to include informationregarding the adapting of the custom instructions.
 42. The method ofclaim 41, wherein the custom instructions are passed from the complierto the timing manager using a custom instruction file, and wherein thecapabilities information is passed from the complier to the timingmanager using a framework capabilities description file.
 43. The methodof claim 41, wherein the parsing statements of input program code togenerate custom instructions is agnostic with respect to hardware timingof the reconfigurable processor.
 44. The method of claim 43, wherein theparsing statements of input program code to generate custom instructionscomprise: implementing constraints, from a compiler custom instructionconstraint set, based upon physical limitations imposed with respect tothe reconfigurable processor, whereby the implementation of theconstraints enables the reconfigurable processor hardware timingagnostic operation by the compiler.
 45. The method of claim 44, whereinthe implementing constraints comprises: preventing a custom instructionfrom exceeding any constraint of the complier custom instructionconstraint set.
 46. The method of claim 44, wherein the custominstruction constraint set includes at least one constraint selectedfrom the group consisting of a constraint regarding how many ports areavailable to access memory, a constraint regarding how many variablesmay be accessed, a constraint regarding which type of variables may beaccessed, a constraint regarding memory access, a constraint regardingarrayed variable access, and constraint regarding a messaging interface.47. The method of claim 41, wherein the adapting the custom instructionsfor hardware timing of the reconfigurable processor comprises: analyzingthe custom instructions to determine hardware timing for the custominstructions based at least in part on the capabilities information. 48.The method of claim 47, wherein the adapting the custom instructions forthe reconfigurable processor hardware timing comprises: analyzingindividual case statements of the custom instructions to determine howmany physical clock cycles to spread those instructions over in order tomake target hardware timing requirements with respect to thereconfigurable processor.
 49. The method of claim 47, wherein theadapting the custom instructions for the reconfigurable processorhardware timing comprises: inserting staging registers in appropriatepositions in the custom instructions in order to make hardware timingrequirements with respect to the reconfigurable processor.
 50. Themethod of claim 47, wherein the adapting the custom instructions forhardware timing of the reconfigurable processor comprises: implementingtiming constraints, from a timing manager timing constraint set, basedupon hardware timing of the reconfigurable processor.
 51. The method ofclaim 40, wherein timing constraint set comprises at least one timingconstraint selected from the group consisting of latency forimplementing memory access, latency for implementing data output,latency for performing operations, and latency for performing variableaccess.
 52. The method of claim 41, further comprising: processing, by aframework generator, the custom instructions after the adapting thereofto generate one or more modules comprising routines that call the custominstructions and implement reconfigurable processor capabilities of thetiming adapted framework capabilities description file; and generating aframework file, from the one or more routines, comprising an executabledescription of the reconfigurable processor custom instruction set andinterfaces to appropriate reconfigurable processor capabilities.
 53. Themethod of claim 42, wherein the custom instructions are passed, afterthe adapting thereof, from the timing manager to the framework generatorusing a timing adjusted custom instruction file, and wherein thecapabilities information is passed, after the adapting thereof, from thetiming manager to the framework generator using a timing adjustedframework capabilities description file.
 54. The method of claim 42,wherein the executable description comprises an executable model of thereconfigurable processor.
 55. The method of claim 42, furthercomprising: simulating, using the executable description of thereconfigurable processor custom instruction set of the framework file,operation of the reconfigurable processor, thereby generating asimulated operation; and optimizing one or more custom instruction ofthe custom instruction set using performance results provided by thesimulated operation.
 56. The method of claim 42, further comprising:generating, using the framework file, one or more hardware descriptionlanguage file for loading the custom instruction set on thereconfigurable processor.
 57. The method of claim 1, wherein theinformation regarding the capabilities of the reconfigurable processorused by the custom instructions includes at least one of: variable type;external module identification; port identification; support for moduleswith multi-threaded execution with custom instructions; support for atleast one of C style typedefs, structures, or unions; support for atleast one of thread private, thread shared, global variables, orpipeline staging variables; support for custom instruction memory readand write operations; or support for modules to interact including atleast one of remote module thread creation, message passing, or globalvariable access.
 58. The method of claim 47, wherein the custominstructions include individual case entries within switch statements.